import request from '@/utils/request'

// 获取员工列表
export function getEmployeeListAPI(params) {
  return request({
    url: '/park/sys/user',
    params
  })
}

// 添加员工
export function createEmployeeAPI(data) {
  return request({
    url: `/park/sys/user`,
    method: 'POST',
    data
  })
}

// 删除员工/park/sys/user/{id}
export function deleteEmployeeAPI(id) {
  return request({
    url: `/park/sys/user/${id}`,
    method: 'DELETE'
  })
}

// 编辑用户/park/sys/user
export function updateEmployeeAPI(data) {
  return request({
    url: `/park/sys/user`,
    method: 'PUT',
    data
  })
}

// 获取用户详情/park/sys/user/{id}
export function getEmployeeDetailAPI(id) {
  return request({
    url: `/park/sys/user/${id}`
  })
}

// 重置密码/park/sys/user/resetPwd
export function resetPasswordAPI(id) {
  return request({
    url: `/park/sys/user/resetPwd`,
    method: 'PUT',
    data: { id }
  })
}
